<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"><!-- InstanceBegin template="/Templates/mainpage_notag.dwt" codeOutsideHTMLIsLocked="false" -->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<!-- InstanceBeginEditable name="doctitle" -->
<title>二手易</title>
<!-- InstanceEndEditable -->
<link href="css/stylesheet.css" rel="stylesheet" type="text/css" media="screen" />
<!-- InstanceBeginEditable name="head" -->
<script src="SpryAssets/SpryValidationTextField.js" type="text/javascript"></script>
<script src="SpryAssets/SpryValidationPassword.js" type="text/javascript"></script>
<script src="SpryAssets/SpryValidationConfirm.js" type="text/javascript"></script>
<link href="SpryAssets/SpryValidationTextField.css" rel="stylesheet" type="text/css" />
<link href="SpryAssets/SpryValidationPassword.css" rel="stylesheet" type="text/css" />
<link href="SpryAssets/SpryValidationConfirm.css" rel="stylesheet" type="text/css" />
<script type="text/javascript"> 
function refresh(){
var cap = document.getElementById("cimageframe");
cap.innerHTML = "<img src='cimage?a=" + Math.random() + "'/>";
} 
</script>
<%
String msg = request.getParameter("msg");
String username = (String)session.getAttribute("username");
if(username==null) {
  response.sendRedirect("NotLoginPage.jsp");
  return;
}
%>
<!-- InstanceEndEditable -->

</head>
<body>
<div class="main">
  <div class="header">
    <div class="header-top">
    
      <div class="login-bg">
      <a href="login.jsp" class="black-link">登入</a><span class="style3"> |</span>
      <a href="#" class="black-link">買賣須知</a><span class="style3"> |</span>
      <a href="#" class="black-link">聯絡我們</a> <span class="style3">|</span>
      <a href="#" class="black-link">關於2HE</a>
      
      </div>
    </div>
    <div class="header-bottom">
      <div id="navcontainer">
        <ul class="navlist">
          <li class=""><a href="index.jsp">首頁</a></li>
          <li class=""><a href="#">要買</a></li>
          <li class=""><a href="AddItem.jsp?go=AddItem.jsp">要賣</a></li>
          <li class=""><a href="changeInfo.jsp?go=changeInfo.jsp">我的主頁</a></li>
          <li class=""><a href="#">我的信箱</a></li>
        </ul>
      </div>
      <!-- InstanceBeginEditable name="DoNotEdit" --><!-- InstanceEndEditable -->
    </div>
  </div>
  <div class="body-main"><!-- InstanceBeginEditable name="mainbody" --> <br/>
    <br/>
    <div class="registration-box">
      <div id="msg" class="error-style">
        <%if ("1".equals(msg)) {%>
        <h3>請輸入正確之驗證碼</h3>
        <%} %>
      </div>
      <h1>更改密碼</h1>
      <form name="register" action="ChangePasswordServlet" method="post">
        <table width="607" height="350" cellpadding="5">
          <tr>
            <td width="119">用戶名稱:</td>
            <td width="476"><%=username%> </td>
          </tr>
          <tr>
            <td>舊密碼:</td>
            <td><span id="spassword1">
              <input name="password1" type="password" id="password1" size="20" maxlength="10" />
              <span class="passwordRequiredMsg">必須填寫.</span> <span class="passwordMinCharsMsg">最少六個英文字母或數字.</span> </span></td>
          </tr>
          <tr>
            <td>新密碼:</td>
            <td><span id="spassword">
              <input name="password9" type="password" id="password9" size="20" maxlength="10" />
              <span class="passwordRequiredMsg">必須填寫.</span> <span class="passwordMinCharsMsg">最少六個英文字母或數字.</span> </span><br/>
              (六位至十位密碼)</td>
          </tr>
          <tr>
            <td>新密碼確認:</td>
            <td><span id="srepassword">
              <input name="repassword" type="password" id="repassword" size="20" maxlength="10" />
              <span class="confirmInvalidMsg">請輸入與上相同密碼</span><span class="confirmRequiredMsg">必須填寫.</span> </span><br/>
              (請重新輸入密碼作確認)</td>
          </tr>
          <tr>
            <td>驗證碼:</td>
            <td><span id="scaptcha">
              <input name="captchacode" type="text" id="captchacode" size="20" maxlength="4" />
              <span class="textfieldRequiredMsg">必須填寫。</span></span> </td>
          </tr>
          <tr>
            <td colspan="2" align="center"><div id="cimageframe"><img src="cimage"/></div>
              <br/>
              <a onclick="refresh()">refresh</a> </td>
          </tr>
          <tr>
            <td colspan="2"><div align="center">
                <input type='image' src='images/update-bt.gif'/>
                <img src="images/back-bt.gif" alt="cancel" width="75" height="32" /></div></td>
          </tr>
        </table>
      </form>
    </div>
    <br/>
    <br/>
    <script type="text/javascript">
<!--
var sprytextfield7 = new Spry.Widget.ValidationPassword("spassword1", {validateOn:["blur"], minChars:6});
var sprytextfield5 = new Spry.Widget.ValidationPassword("spassword", {validateOn:["blur"], minChars:6});
var sprytextfield6 = new Spry.Widget.ValidationConfirm("srepassword", "spassword", {validateOn:["blur", "change"]});
var sprytextfield4 = new Spry.Widget.ValidationTextField("scaptcha", "none");
//-->
</script>
    <!-- InstanceEndEditable --></div>
  <div class="footer">Copyright&copy; <a href="http://www.2handeasy.com" class="footer-link">二手易</a> All rights reserved.  |  版權所有不得轉載</div>
</div>
</body>
<!-- InstanceEnd --></html>
